package com.province.platform.common.enums;

import com.province.platform.common.spi.ErrorCode;

public enum PlatformErrorCode implements ErrorCode {
    REQUIRED_VALUE("Platform-00", "必填的参数缺失"),
    FAIL_CONNECT("Platform-01", "telnet失败，无法与服务器建立连接"),
    SERVICE_ACCESS_ERROR("Platform-02", "服务访问异常");

    private final String code;

    private final String desc;

    private PlatformErrorCode(String code, String description) {
        this.code = code;
        this.desc = description;
    }

    @Override
    public String getCode() {
        return this.code;
    }

    @Override
    public String getDesc() {
        return this.desc;
    }

    @Override
    public String toString() {
        return String.format("Code:[%s], Desc:[%s]. ", this.code,
                this.desc);
    }
}
